package com.itheima.chapter09.file;

import java.io.File;

//File类的构造方法
public class FileDome1 {
    public static void main(String[] args) {
        method1();
        System.out.println("_______________");
        method2();
        System.out.println("_______________");
        method3();

    }

    private static void method3() {
        String path ="a.txt";
        File file =new File("D:\\my_project");
        File f =new File(file, path);
        System.out.println(f);
    }

    private static void method2() {
        String path ="D:\\my_project";
        String path1 ="a.txt";
        File file =new File(path,path1);
        System.out.println(file);
    }

    private static void method1() {
        String path ="D:\\my_project\\a.txt";
        File file =new File(path);
        System.out.println(file);
    }
}
